
################################################################################
# For the dependencies, we will add the files by GLOB_RECURSE, but we will
# initiate it from here (so that we don't need to add a CMakeLists.txt to
# each dependency.)
################################################################################

source_group( "CMakeLists\\dependencies" FILES "dependencies/CMakeLists.txt" )
list( APPEND CMAKELISTS "dependencies/CMakeLists.txt" )

# Add the dependencies directory to the include path:
#include_directories( dependencies )

# Add the library directory to the linker search path:
cmake_policy( SET CMP0015 NEW )
link_directories( lib )

################################################################################
# TinyXML (http://www.grinninglizard.com/tinyxml/)
# Build this as a static library with DLL support, so that it may be linked to
# from any plugin that needs XML parsing.
################################################################################

# Add all of the TinyXML files:
file( GLOB_RECURSE DEP_TINYXML_SRC "TinyXML/*.cpp" )
file( GLOB_RECURSE DEP_TINYXML_HDR "TinyXML/*.h" )

# Add the library to the solution:
add_library( TinyXML STATIC ${DEP_TINYXML_SRC} ${DEP_TINYXML_HDR} )

# Put the compiled library in the common directory so that other projects can
# have access to it.
set_target_properties( TinyXML PROPERTIES ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib" )
set_target_properties( TinyXML PROPERTIES ARCHIVE_OUTPUT_DIRECTORY_RELEASE "${CMAKE_SOURCE_DIR}/lib" )
set_target_properties( TinyXML PROPERTIES ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${CMAKE_SOURCE_DIR}/lib" )

# Specify names for the targets:
set_target_properties( TinyXML PROPERTIES ARCHIVE_OUTPUT_NAME_RELEASE TinyXML )
set_target_properties( TinyXML PROPERTIES ARCHIVE_OUTPUT_NAME_DEBUG TinyXML_d )
